<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
<!--  <div id="app">-->
<!--    <h1>差值表达式</h1>-->
<!--    <h3>{{ msg }}</h3>-->
<!--    <h3>{{ count }}</h3>-->
<!--    <h1>v-text</h1>-->
<!--    <div v-text="msg"></div>-->
<!--    <h1>v-model</h1>-->
<!--    <h2 v-on:click="alert2">点击alert(2)</h2>-->
<!--    <input type="text" v-model="msg">-->
<!--    <input type="text" v-model="count">-->
<!--  </div>-->

  <div id="app1">
    <h1 :data-id="msg">v-bind</h1>
    <h1 v-if="msg">显示与否</h1>
    <h1>差值表达式</h1>
    <h3>{{ msg }}</h3>
    <h3>{{ count }}</h3>
    <h1>v-text</h1>
    <div v-text="msg"></div>
    <h1>v-model</h1>
    <h2 @click="alert2">点击alert(2)</h2>
    <h1 v-html="htmlCode"></h1>
    <input type="text" v-model="msg" v-on:input="input1" />
    <input type="text" v-model="count" />
  </div>
<!--  <script src="./main.js"></script>-->
  <script src="./js/watcher.js"></script>
  <script src="./js/dep.js"></script>
  <script src="./js/compiler.js"></script>
  <script src="./js/observer.js"></script>
  <script src="./js/vue.js"></script>
  <script>
    let vm = new Vue({
      el: '#app1',
      data: {
        msg: 'Hello Vue',
        count: 100,
        person: {
          name: 'wubo'
        },
        htmlCode: '<div>1232</div>'
      },
      methods: {
        alert2() {
          alert(2);
        },
        input1(e) {
          console.log(e);
        }
      }
    })
    console.log(vm);
  </script>
</body>
</html>
